<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:58:"D:\phpstudy_pro\WWW\hsycmsv1/app/hsycms\view\cate\add.html";i:1535016379;s:60:"D:\phpstudy_pro\WWW\hsycmsv1\app\hsycms\view\index\head.html";i:1533175385;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HSYCMS后台管理系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<link rel="stylesheet" href="/public/layui/css/layui.css?v=<?php echo time(); ?>" />
<link rel="stylesheet" type="text/css" href="/public/admin/css/touchTouch.css?v=<?php echo time(); ?>">
<link rel="stylesheet" href="/public/admin/css/admin.css?v=<?php echo time(); ?>" />
<script src="/public/admin/js/jquery.js?v=<?php echo time(); ?>"></script>
<script src='/public/tinymce/tinymce.min.js'></script>
<script src="/public/admin/js/validform5.3.2min.js"></script>
<script src="/public/layer//layer.js?v=<?php echo time(); ?>"></script>
<script src="/public/layui/layui.js?v=<?php echo time(); ?>"></script>
<script src="/public/admin/js/touchTouch.jquery.js"></script> 
<script src="/public/admin/js/admin.js?v=<?php echo time(); ?>"></script>
</head>
<body>

<div class="box">
  <form method="post" action="<?php echo url('add'); ?>" class="sycmsform">
    <div class="box-head">
      <h2><?php echo !empty($v['id'])?'编辑':'添加'; ?>分类</h2>
      <div class="fr">
        <button type="submit" class="btn"><i class="icon-check"></i><?php echo !empty($v['id'])?'编辑':'添加'; ?></button>
        &nbsp;<a href="javascript:history.go(-1);" class="btn fr"><i class="icon-mail-reply (alias)"></i>返回</a></div>
    </div>
    <div class="form">
    <input type="hidden" name="id" value="<?php echo $v['id']; ?>" />
    <input type="hidden" name="nid" value="<?php echo $nid; ?>" />
    <ul>
     <?php if($v['pid'] != '0'): ?>
      <li>
        <label>上级分类：</label>
        <div class="item">
          <div class="select"><i class="icon-caret-down"></i>
            <input type="hidden" name="pid" value="<?php echo $v['pid']; ?>" class="inputval" />
            <input type="text" readonly placeholder="请选择上级分类" value="" class="input" />
            <dl class="select-value syui-anim syui-anim-up">
              <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;if($vo['id'] != $v['id']): ?>
              <dd data="<?php echo $vo['id']; ?>" <?php if($vo['id'] == $v['pid']): ?>class=selected<?php endif; ?>><?php echo $vo['title']; ?></dd>
              <?php endif; if(is_array($vo['son']) || $vo['son'] instanceof \think\Collection || $vo['son'] instanceof \think\Paginator): $i = 0; $__LIST__ = $vo['son'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vs): $mod = ($i % 2 );++$i;if($vs['id'] != $v['id']): ?>
              	 <dd data="<?php echo $vs['id']; ?>" <?php if($vs['id'] == $v['pid']): ?>class=selected<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;|---<?php echo $vs['title']; ?></dd>
                 <?php endif; endforeach; endif; else: echo "" ;endif; endforeach; endif; else: echo "" ;endif; ?>
            </dl>
          </div>
        </div>
      </li>
      <?php endif; ?>
      <li>
        <label>分类名称：</label>
        <div class="item">
          <input type="text" name="title" value="<?php echo $v['title']; ?>" class="input" datatype="*" nullmsg="请输入分类名称"/>
        </div>
      </li>
       <li>
        <label>分类副标题：</label>
        <div class="item">
          <input type="text" name="subtitle" value="<?php echo $v['subtitle']; ?>" class="input" />
        </div>
      </li>
      <li>
        <label>网址URL名称：</label>
        <div class="item">
          <input type="text" class="input" name="entitle" value="<?php echo $v['entitle']; ?>" /><span class="tips">必须英文，不能带空格或 _ / 等符号</span>
        </div>
      </li>
      <li>
        <label>分类图片：</label>
        <div class="item">
          <input type="text" name="img" value="<?php echo $v['img']; ?>" class="input"/>
          <button type="button" class="button fl" onclick="sycms.showupload(this)" id="image1" at="dg"><i class="icon-plus"></i>浏览上传</button>
          <div class="clear"></div>
          <div class="input-image"><?php if($v['img']): ?><img src="<?php echo $v['img']; ?>" alt="" /><?php endif; ?></div>
        </div>
      </li>      
      <li>
        <label>SEO标题：</label>
        <div class="item">
          <input type="text" class="input w100" value="<?php echo $v['seo_title']; ?>" name="seo_title"  />
        </div>
      </li>
      <li>
        <label>SEO关键字：</label>
        <div class="item">
          <input type="text" class="input w100" value="<?php echo $v['seo_keywords']; ?>" name="seo_keywords"  />
        </div>
      </li>
      <li style="height:70px;">
        <label>SEO描述：</label>
        <div class="item">
          <textarea type="text" class="input w100" name="seo_description"><?php echo $v['seo_description']; ?></textarea>
        </div>
      </li>
      <?php if($v['id'] != ''): ?>
      <li>
        <label>是否显示：</label>
        <div class="item">
          <input type="hidden" value="<?php echo $v['isshow']; ?>" name="isshow" />
          <div class="switch <?php echo $v['isshow']==1?on:''; ?>"><em ontxt="显示" offtxt="隐藏"><?php echo $v['isshow']==1?'显示':'隐藏'; ?></em><i></i></div>
        </div>
      </li>
      <?php endif; ?>
      <li>
        <label>排序：</label>
        <div class="item">
          <input type="text" class="input" type="number" value="<?php echo (isset($v['sort']) && ($v['sort'] !== '')?$v['sort']:0); ?>" name="sort"  />
        </div>
      </li>
      <li>
        <label>分类描述：</label>
        <div class="item">
          <textarea name="content" class="input w100 editor" style="height:120px;"><?php echo $v['content']; ?></textarea>    
        </div>
      </li>
      <li>
        <label>&nbsp;</label>
        <div class="item">
          <button type="submit" class="button"><i class="icon-check"></i><?php echo !empty($v['id'])?'编辑':'添加'; ?></button>
        </div>
      </li>
    </ul>
  </form>
</div>
</div>
<script> sycms.submitform("<?php echo url('index',['nid'=>$nid]); ?>"); </script>